package wc.controller.factory;

import wc.model.component.*;
import wc.model.component.mallinterior.*;
import wc.model.grid.*;

public class MallInteriorFactory {
	private static MallInteriorFactory instance = null;

	private MallInteriorFactory() {}

	public static MallInteriorFactory getInstance() {
		if(instance == null) {
			instance = new MallInteriorFactory();
		}
		return instance;
	}

	public Object clone() throws CloneNotSupportedException {
		throw new CloneNotSupportedException(); 
	}

	public Bench createBench() {
		TileGrid<Component> tg = new TileGrid<Component>(2, 1);
		Bench bench = new Bench(tg);
		tg.setComponent(bench);
		return bench;
	}
	
	public Fountain createFountain() {
		TileGrid<Component> tg = new TileGrid<Component>(2,2);
		Fountain fountain = new Fountain(tg);
		tg.setComponent(fountain);
		return fountain;
	}
	
	public TrashCan createTrashCan() {
		TileGrid<Component> tg = new TileGrid<Component>(1,1);
		TrashCan trashCan = new TrashCan(tg);
		tg.setComponent(trashCan);
		return trashCan;
	} 
	
	public VendingMachine createVendingMachine() {
		TileGrid<Component> tg = new TileGrid<Component>(1,1);
		VendingMachine vendingMachine = new VendingMachine(tg);
		tg.setComponent(vendingMachine);
		return vendingMachine;
	} 
	
	public Tree createTree() {
		TileGrid<Component> tg = new TileGrid<Component>(1,1);
		Tree tree = new Tree(tg);
		tg.setComponent(tree);
		return tree;
	}
}
